home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-03 | 2.3 KB | 97 lines | [TEXT/MPS ] |
- # Do from one to four stages of GCC compilation/self-compilation,
- # for all the target machines specified.
- #
- # This script can take a very long time to run!
- #
- # Copyright © 1990-1993 Apple Computer, Inc.
-
- set GCC "`Directory -q`"
-
- Set BuildList ""
- Set Testing ""
- Set CheckArg ""
- Set TargetMainFolder ":Targets:"
-
- # Bison needs this to be defined.
-
- If "{BISON_SIMPLE}" == ""
- Set BISON_SIMPLE "{Libraries}bison.simple"
- Export BISON_SIMPLE
- End If
-
- # Recognize specific options, put everything else on the build list.
-
- Loop
- Break If "{#}" == 0
- If "{1}" =~ /-check/
- Set Testing "Echo ' '"
- Set CheckArg "{1}"
- Else If "{1}" =~ /-folder/
- Shift 1
- Set TargetMainFolder "{1}"
- Else If "{1}" =~ /-help/
- echo "BuildGCC [<target>][,stages][,programs] ... [ options ]"
- echo " -check Display commands without executing them"
- echo " -folder <xxx> Get following targets from folder <xxx>"
- echo " -help Display this message"
- echo ""
- echo "Target machines currently set up in {TargetMainFolder}"
- echo ""
- For TargetFolder in `Files "{TargetMainFolder}"`
- If "{TargetFolder}" =~ /:(≈)®1:/
- # should test for existence of all required files?
- If "`Exists {TargetMainFolder}{®1}:config.h`" != ""
- echo " " "{®1}"
- End If
- End If
- End For
- Echo ""
- Exit 0
- Else
- Set BuildList "{BuildList} {1}"
- End If
- Shift 1
- End Loop
-
- # Add a default build if none were requested.
-
- if "{BuildList}" == ""
- Set BuildList "Mac68K,1,all"
- End If
-
- # Iterate through the different builds and stages.
-
- For ABuild in {BuildList}
- Set NumStages 1
- Set TargetMachine Mac68K
- Set Programs all
- If "{ABuild}" =~ /(≈)®1,([0-9])®2,(≈)®3/
- set TargetMachine "{®1}"
- set NumStages "{®2}"
- set Programs "{®3}"
- Else If "{ABuild}" =~ /(≈)®1,([0-9])®2/
- set TargetMachine "{®1}"
- set NumStages "{®2}"
- Else If "{ABuild}" =~ /([0-9])®1,(≈)®2/
- set NumStages "{®1}"
- set Programs "{®2}"
- Else if "{ABuild}" =~ /([0-9])®2/
- set NumStages "{®2}"
- Else if "{ABuild}" =~ /[¬,]+/
- set TargetMachine "{ABuild}"
- Else
- # Go with one stage of default build
- End
- Set StageN 1
- Loop
- Break If {StageN} > {NumStages}
- Directory "{GCC}"
- {Testing} {GCC}Build:BuildOneStage "{TargetMachine}" {StageN} "{Programs}"
- If "{Testing}" != ""
- {GCC}Build:BuildOneStage "{TargetMachine}" {StageN} "{Programs}" "{Testing}"
- End If
- Evaluate StageN += 1
- End
- End For
-
-